﻿using System.ServiceProcess;

namespace ClockAnalog
{
	public partial class ClockService : ServiceBase
	{
		public ClockService()
		{
			InitializeComponent();
			if (!System.Diagnostics.EventLog.SourceExists("DoDyLogSourse"))
				System.Diagnostics.EventLog.CreateEventSource("DoDyLogSourse", "DoDyLog");

			eventClockLog.Source = "Clock Service Source";
			// the event log source by which 

			//the application is registered on the computer

			eventClockLog.Log = "Clock Log";
		}

		protected override void OnStart(string[] args)
		{
			eventClockLog.WriteEntry("ClockService start");

		}

		protected override void OnStop()
		{
			eventClockLog.WriteEntry("ClockService stop");
		}
	}
}
